<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Liubuzhu
  Date: 2023/12/19
  Time: ฅ(΅•ㅅ•΅❀)ฅ 10:04
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>修改密码页</title>

	<link rel="stylesheet" href="<c:url value="/css/bootstrap.min.css"/>">
	<script src="<c:url value="/js/bootstrap.bundle.min.js"/>"></script>
	<style>
		.back {
			background-image: url("<c:url value="/img/login/bg.png"/>");
			background-size: cover;
			background-repeat: no-repeat;
			background-position: center;
			height: 100vh;
		}

		.custom-file-input {
			display: none;
		}

		.profile-image {
			max-width: 150px;
			cursor: pointer;
		}
		.form-style {
			border: 1px solid greenyellow;
			padding: 20px;
			border-radius: 15px;
		}
	</style>
</head>

<body class="bg-light back">
<div class="container" style="margin-top: 20px;">
	<main>
		<div class="col-md-7 col-lg-8 mx-auto">
			<h4 class="mb-3 text-center" style="color: aliceblue;">修改密码</h4>
			<form class="needs-validation form-style" novalidate style="background-color: whitesmoke;" action="<c:url value="/updatePassword"/>">
				<div class="row g-3">
					<input type="hidden" value="${sessionScope.user.customerId}" name="playerId" id="playerId">
					<div class="col-12">
						<label for="oldPassword" class="form-label">旧密码</label>
						<div class="input-group has-validation">
							<input type="password" class="form-control" name="oldPassword" id="oldPassword" required>
							<div class="invalid-feedback">
								请输入旧密码
							</div>
						</div>
					</div>

					<div class="col-12">
						<label for="newPassword" class="form-label">新密码</label>
						<div class="input-group has-validation">
							<input type="password" class="form-control" name="newPassword" id="newPassword" required>
							<div class="invalid-feedback">
								请输入新密码
							</div>
						</div>
					</div>

					<div class="col-12">
						<label for="confirmPassword" class="form-label">确认密码</label>
						<input type="password" class="form-control" name="confirmPassword" id="confirmPassword"   required>
						<div class="invalid-feedback">
							再次输入密码
						</div>
					</div>

				</div>
				<%= request.getAttribute("error")%>
				<hr class="my-4">

				<button class="w-100 btn btn-primary btn-lg" type="submit">修改密码</button>
			</form>
		</div>
	</main>
</div>
<script>
</script>
</body>

</html>

